import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-zhuce-pro',
  templateUrl: './zhuce-pro.page.html',
  styleUrls: ['./zhuce-pro.page.scss'],
})
export class ZhuceProPage implements OnInit {

  public userInfo:any={
    name:'',
    phoneNumber:'',
    pwd:'',
    question:'',
    answer:''
  }

  constructor(public router:Router,public arouter:ActivatedRoute) { }

  ngOnInit() {

    this.arouter.params.subscribe((data)=>{
      this.userInfo.name = data.name;
      this.userInfo.phoneNumber = data.phoneNumber;
      this.userInfo.pwd = data.pwd;
      console.log(this.userInfo)
    })
  }

  next() {
    // if (this.problem == "") {
    //   alert("请输入问题");
    // } else if (this.answer == "") {
    //     alert("请输入密码");
    // }else {
        this.router.navigate(['/zhuce-sex/',this.userInfo])
    // }
  }


}
